package ru.spb.osll.myfit.client.widget;

import com.google.gwt.user.client.ui.Label;

import ru.spb.osll.myfit.client.PageMode;
import ru.spb.osll.myfit.client.log.RemoteLogger;
import ru.spb.osll.myfit.common.PageElement;
import ru.spb.osll.myfit.common.PageElementType;
import ru.spb.osll.myfit.common.PageError;

public class PageErrorWidget extends PageElementWidget{
  
  Label m_label = new Label();

  public PageErrorWidget(GWTWidgetFactory gwtWidgetFactory, PageError exception) {
    super(gwtWidgetFactory);
    m_label.setText(exception.getMessage());
    RemoteLogger.info("exception.getMessage() = " +exception.getMessage());
    initWidget(m_label);
  }

  @Override
  public PageElement getPageElement() {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  public void setMode(PageMode mode) {
    // TODO Auto-generated method stub
  }
  
  @Override
  public void setOpen (boolean IsOpen) {
    // TODO 
  }

  @Override
  public PageElementType getType() {
    return PageElementType.PAGE_ERROR;
  }

}
